package cn.com.surker.material.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 材料盘存汇总表
 * </p>
 *
 * @author admin
 * @since 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MainMaterialInventory extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "标识不能为空！", groups = {UpdateStatusGroup.class, UpdateGroup.class})
    private Long id;

    /**
     * 公司ID
     */
    @NotNull(message = "公司标识不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Long orgId;

    /**
     * 生成时间
     */
    @NotNull(message = "公司标识不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String today;

    /**
     * 报表开始时间
     */
    private String startTime;

    /**
     * 报表结束时间
     */
    private String endTime;

    /**
     * 材料名称
     */
    private String materialNorms;

    /**
     * 材料品种
     */
    private Integer breedType;

    /**
     * 结存
     */
    private Double lastStorage;

    /**
     * 购进重量
     */
    private Double buyWeight;

    /**
     * 加工重量
     */
    @NotNull(message = "请输入加工重量", groups = {AddGroup.class, UpdateGroup.class})
    private Double addWeight;
    /**
     * 合计进货
     */
    private Double sumWeight;

    /**
     * 生产消耗
     */
    private Double proExpend;

    /**
     * 理论消息
     */
    private Double theoryExpend;

    /**
     * 手动消耗
     */
    @NotNull(message = "请输入手动消耗值", groups = {AddGroup.class, UpdateGroup.class})
    private Double handExpend;

    /**
     * 调整消耗
     */
    private Double adjustExpend;

    /**
     * 合计消耗
     */
    private Double sumExpend;

    /**
     * 本月账存
     */
    private Double monthStorage;

    /**
     * 差异
     */
    private Double difference;

    /**
     * 盘存值
     */
    private Double inventory;

    private Integer isCheck;

    private String checker;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkTime;

    private Integer isFinance;

    private String finance;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date financeTime;

    public MainMaterialInventory(){}

    public MainMaterialInventory(Long orgId, String today, String startTime, String endTime, String materialNorms, Integer breedType, Double lastStorage, Double buyWeight, Double addWeight, Double proExpend, Double theoryExpend, Double handExpend, Double adjustExpend, Double sumExpend, Double monthStorage, Double difference, Double inventory, Integer isCheck, Integer isFinance) {
        this.orgId = orgId;
        this.today = today;
        this.startTime = startTime;
        this.endTime = endTime;
        this.materialNorms = materialNorms;
        this.breedType = breedType;
        this.lastStorage = lastStorage;
        this.buyWeight = buyWeight;
        this.addWeight = addWeight;
        this.proExpend = proExpend;
        this.theoryExpend = theoryExpend;
        this.handExpend = handExpend;
        this.adjustExpend = adjustExpend;
        this.sumExpend = sumExpend;
        this.monthStorage = monthStorage;
        this.difference = difference;
        this.inventory = inventory;
        this.isCheck = isCheck;
        this.isFinance = isFinance;
    }
}
